package com.lagou.edu.client;

import feign.Logger;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by shixi  on 2021/1/28
 */
@FeignClient(name = "lagou-service-email")
public interface EmailService {

    @RequestMapping(value = "/email/{email}/{code}", method = RequestMethod.GET)
    boolean send(
            @PathVariable(value = "email") String email,
            @PathVariable(value = "code") String code);
}

@Configuration
class FeignConfig{

    @Bean
    Logger.Level feignLevel(){
        return Logger.Level.FULL;
    }
}
